import config from "@/config"
import http from "@/utils/request"

export default {
    getOrder: {
        lists:{
            url: `${config.API_URL}/adminapi/order.shopOrder/lists`,
            name: "获取订单列表",
            get: async function(data={}){
                return await http.get(this.url, data);
            }
        },
        add: {
			url: `${config.API_URL}/adminapi/order.shopOrder/add`,
			name: "添加订单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        edit: {
			url: `${config.API_URL}/adminapi/order.shopOrder/edit`,
			name: "编辑订单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/order.shopOrder/detail`,
			name: "订单详情",
			get: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        delete: {
			url: `${config.API_URL}/adminapi/order.shopOrder/delete`,
			name: "删除订单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        deleteAll: {
			url: `${config.API_URL}/adminapi/order.shopOrder/deleteAll`,
			name: "删除全部订单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        addChild: {
			url: `${config.API_URL}/adminapi/order.shopOrder/addChildOrder`,
			name: "添加子单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        getChildNumber: {
			url: `${config.API_URL}/adminapi/order.shopOrder/getDetailByFactoryNumber`,
			name: "添加子单是获取商品数量",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
        waitNoticeOrder:{
            url: `${config.API_URL}/adminapi/order.shopOrder/getOrderOfNotifiedList`,
            name: "获通知待发货列表",
            get: async function(params){
				return await http.get(this.url, params);
			}
        },
        waitOrderList:{
            url: `${config.API_URL}/adminapi/order.shopOrderChild/lists`,
            name: "获待发货列表",
            get: async function(params){
				return await http.get(this.url, params);
			}
        },
        waitOrderSend: {
			url: `${config.API_URL}/adminapi/order.shopOrderChild/sendOut`,
			name: "发货操作",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        waitOrderSendAll: {
			url: `${config.API_URL}/adminapi/order.shopOrderChild/batchSendOut`,
			name: "批量发货",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        waitOrderDelete: {
			url: `${config.API_URL}/adminapi/order.shopOrderChild/delete`,
			name: "待发货删除",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        takeOver: {
			url: `${config.API_URL}/adminapi/order.shopOrderChild/takeOver`,
			name: "收货",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        // refundGoods: {
		// 	url: `${config.API_URL}/adminapi/order.shopOrderChild/refundGoods`,
		// 	name: "退货",
		// 	post: async function(data={}){
		// 		return await http.post(this.url, data);
		// 	}
		// },
        refundReason: {
			url: `${config.API_URL}/adminapi/order.shopOrderChild/refundReason`,
			name: "退货原因",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        repairPutIn: {
			url: `${config.API_URL}/adminapi/order.shopOrderChild/repairPutIn`,
			name: "返修入库",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        originalShipment: {
			url: `${config.API_URL}/adminapi/order.shopOrderChild/originalShipment`,
			name: "原单发货",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        getHistory:{
            url: `${config.API_URL}/adminapi/order.shopOrder/getHistoryList`,
            name: "工厂货号下的历史记录",
            get: async function(params){
				return await http.get(this.url, params);
			}
        },

	},
    factory:{
        // 日账单详情
        dayBillDetail:{
            url: `${config.API_URL}/adminapi/finance.BillDays/detail`,
            name: "获取组成日账单的订单",
            get: async function(params){
				return await http.get(this.url, params);
			}
        },
    },
    custom:{
        dayBillDetail:{
            url: `${config.API_URL}/adminapi/finance.billCustomDays/detail`,
            name: "获取组成日账单的订单",
            get: async function(params){
				return await http.get(this.url, params);
			}
        },
    },
    applyEdit:{
        url: `${config.API_URL}/adminapi/shop.shopGoods/supplierEditGoods`,
        name: "供应商商品信息保存",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    applyDetail:{
        url: `${config.API_URL}/adminapi/shop.shopGoods/supplierDetail`,
        name: "供应商商品信息详情",
        get: async function(data={}){
            return await http.get(this.url, data);
        }
    },
    export:{
        url: `${config.API_URL}/adminapi/order.shopOrderChild/export`,
        name: "已入库导出",
        get: async function(data={}){
            return await http.get(this.url, data);
        }
    },
}
